import request from '@/utils/request'

// 查询订单信息列表
export function listDdxxb(query) {
  return request({
    url: '/zdgl/ddxxb/list',
    method: 'get',
    params: query
  })
}

// 查询订单信息详细
export function getDdxxb(ddbh) {
  return request({
    url: '/zdgl/ddxxb/' + ddbh,
    method: 'get'
  })
}
//计算总价
export function calDdzj(data) {
  return request({
    url: '/zdgl/ddxxb/calDdzj',
    method: 'post',
    data: data
  })
}

// 新增订单信息文本格式
export function addDdxxbByText(data) {
  return request({
    url: '/zdgl/ddxxb/addDdxxbByText',
    method: 'post',
    data: data
  })
}
// 行内编辑订单信息
export function updateDdxxbByColumn(data) {
  return request({
    url: '/zdgl/ddxxb/updateDdxxbByColumn',
    method: 'post',
    data: data
  })
}
//校验单价乘以数量是不是为总价
export function checkDdxxbByText(data) {
  return request({
    url: '/zdgl/ddxxb/checkDdxxbByText',
    method: 'post',
    data: data
  })
}
// 新增订单信息
export function addDdxxb(data) {
  return request({
    url: '/zdgl/ddxxb',
    method: 'post',
    data: data
  })
}

// 修改订单信息
export function updateDdxxb(data) {
  return request({
    url: '/zdgl/ddxxb',
    method: 'put',
    data: data
  })
}

// 删除订单信息
export function delDdxxb(ddbh) {
  return request({
    url: '/zdgl/ddxxb/' + ddbh,
    method: 'delete'
  })
}
